package com.loyi.ams.gateway.hbmis.rest;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.loyi.ams.gateway.hbmis.dao.IPointerDAO;
import com.loyi.cloud.hbmis.api.IPointerService;
import com.loyi.cloud.hbmis.domain.Pointer;

@RestController
@RequestMapping("pointer")
public class PointerService implements IPointerService {

	@Autowired
	private IPointerDAO pointerDAO;

	@Override
	@RequestMapping(value = "findAll", method = { RequestMethod.GET })
	public List<Pointer> findAll( @RequestParam(value="eprid",required=false)List<Integer> eprid, @RequestParam(value="ptid",required=false)List<String> ptid, @RequestParam(value="region_lv2",required=false)List<Integer> region_lv2,
			@RequestParam(value="region_lv3",required=false)List<Integer> region_lv3, @RequestParam(value="region_lv4",required=false)List<Integer> region_lv4, @RequestParam(value="subjection",required=false)List<Integer> subjection) {
		return pointerDAO.findAll(eprid, ptid, region_lv2, region_lv3, region_lv4, subjection);
	}

}
